-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Fix requires_lto targets needing lto set in cargo #149624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb |
This comment has been minimized.
This comment has been minimized.
|
Hm, not entirely sure of the implications. |
|
The CI/tidy complain seems like a false-positive, the test uses |
Yes, I probably forgot to extend the tidy exception to |
run-make-cargo tests can specify the target in ways we do not detect in the check, so disable the check there.
This comment has been minimized.
This comment has been minimized.
Targets that set `requires_lto = true` were not actually using lto when compiling with cargo by default. They needed an extra `lto = true` in `Cargo.toml` to work. Fix this by letting lto take precedence over the `embed_bitcode` flag when lto is required by a target. If both these flags would be supplied by the user, an error is generated. However, this did not happen when lto was requested by the target instead of the user.
Targets that set
requires_lto = truewere not actually using lto when compiling with cargo by default. They needed an extralto = trueinCargo.tomlto work.Fix this by letting lto take precedence over the
embed_bitcodeflag when lto is required by a target.If both these flags would be supplied by the user, an error is generated. However, this did not happen when lto was requested by the target instead of the user.
Fixes #148514
Tracking issue: #135024